<?php
session_start();
ob_start();
require_once 'libararries/connect.php';
if(isset($_GET['mod'])){
	if($_GET['mod'] == 'inhoadon') 
	{
		require_once 'controllers/admin/controllers_hoadon.php'; 
	}
	else 
	{
	?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Trang quản lý</title>
<link href="public/css/style3.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="public/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="public/js/jquery.min.js"></script>
<script type="text/javascript" src="public/js/datetime.js"></script>
<script type="text/javascript" src="public/js/ddaccordion.js"></script>
<script type="text/javascript" src="public/js/menu_doc.js"></script>
<link rel="stylesheet" type="text/css" href="public/css/menu_doc.css" />
<script type="text/javascript" src="public/js/go.js"></script>
</head>
<body onload=goforit();>
	<div id="warper">
		<div id="containter_contain">
			<div id="header">
				<div id="banner">
				<?php require_once 'controllers/admin/controllers_showbanner.php';?>
				</div>
				<div id="menu">
					<!-- Menu ngang -->
					<div id="dangnhap">
						<!-- Dang nhap -->
						<?php require_once 'controllers/admin/controllers_dangnhap.php';?>
					</div>
					<!-- End dang nhap -->
					<div class="date">
						<!-- Dong ho -->
						<p id=clock></p>
					</div>
					<!-- End dong ho -->

				</div>
				<!-- End menu ngang -->

				<div id="than">
					<div id="cottrai">
					<?php require_once 'views/admin/giaodien/menudoc.php';?>
					</div>
					<!-- The end menu -->
				</div><!-- End Cột trái -->
				<div id="cotgiua">
				<?php
				switch ($_GET['mod'])
				{
					//tac vu user
					case 'user':
					case 'adduser':
					case 'deluser':
					case 'updateuser':{
						require_once 'controllers/admin/controllers_user.php';
						break;
					}
							//Tac vu tin tuc
					case 'tintuc':
					case 'addtintuc':
					case 'deltintuc':
					case 'updatetintuc':{
						require_once 'controllers/admin/controllers_tintuc.php';
						 break;
					}
					
					// Tac vu ho tro online
				    case 'hotro':
					case 'addhotro':
					case 'delhotro':
					case 'updatehotro':{
						require_once 'controllers/admin/controllers_hotro.php';
						 break;
					}
				// Tac vu banner
				    case 'banner':
					case 'addbanner':
					case 'delbanner':
					case 'updatebanner':{
						require_once 'controllers/admin/controllers_banner.php';
						 break;
					}
				// Tac vu quang cao
				    case 'quangcao':
					case 'addquangcao':
					case 'delquangcao':
					case 'updatequangcao':{
						require_once 'controllers/admin/controllers_quangcao.php';
						 break;
					}
				//tac vu chung loai hang 
		            case 'chungloai':
		            case 'addchungloaihang':
		            case 'delchungloaihang':
		            case 'updatechungloaihang':{
			        require_once 'controllers/admin/controllers_chungloai.php'; 
			        break;
					}
							//tac vu loai hang 
					case 'loaihang':
					case 'addloaihang':
					case 'delloaihang':
				    case 'timloaihang':
					case 'updateloaihang':{
						require_once 'controllers/admin/controllers_loaihang.php'; 
						break;
					}
					
							// Tac vu ncc
					case 'ncc':
					case 'addncc':
					case 'delncc':
					case 'updatencc':{
						require_once 'controllers/admin/controllers_ncc.php';
						break;
					}
					
							// tac vu khach hang 
					case 'khachhang':
					case 'addkhachhang':
					case 'delkhachhang':
					case 'updatekhachhang':{
						require_once 'controllers/admin/controllers_khachhang.php';
						break;
					}

							//Tac vu mat hang
					case 'mathang':
					case 'addmathang':
					case 'delmathang':
					case 'timmathang':
					case 'updatemathang':{
						require_once 'controllers/admin/controllers_mathang.php'; 
						break;
					}
				
							//Tac vu binhluan
					case 'binhluan':
					case 'addbinhluan':
					case 'delbinhluan':
					case 'updatebinhluan':{
						require_once 'controllers/admin/controllers_binhluan.php'; 
						break;
					}
					
					//Tac vu hoa don 
					case 'hoadon':
					case 'del_hoadon':
					case 'edit_hoadon':
					case 'add_hoadon':
					case 'chitiethoadon':
					case 'editchitiethd':
					case 'del_cthoadon':
					//case 'inhoadon':
					{
						require_once 'controllers/admin/controllers_hoadon.php';
						break;
					}
							//tac vu chi tiet nhap
					case 'ctnhap':
					case 'add_ctnhap':
					case 'del_ctnhap':
				    case 'timchitietnhap':
					case 'edit_ctnhap':{
						require_once 'controllers/admin/controllers_chitietnhap.php';
						 break;
					}
					case 'tkloinhuan':
					case 'bieudoln':
					case 'bieudodt':
					case 'tkdoanhthu':
					case 'tonkho':{
						require_once 'controllers/admin/controllers_thongke.php';
						break;
					}
					case 'doanhthu':
					case 'loinhuan':{
						require_once 'controllers/admin/controllers_baocao.php';
						break;
					}
					

				}
					?>
				</div><!-- End Cột giữa -->


					</div><!--END than-->

					<div id="footer">
					<div align = "right"><p style="color:yellow; font-sixe: 14px;">Code By Mr.Cường and Mis.Ngọc </p> </div>
					</div><!--END footer-->
					</div>
					</div><!--END warper-->
					</body>
					</html>
					
<?php
	} 
}else 
	if(!isset($_SESSION['dangnhap'])){?>     
            <?php require_once 'controllers/admin/controllers_dangnhap.php';?>
<?php }	 
	?>

<?php ob_end_flush();?>